﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackOffice.Master" AutoEventWireup="true" CodeBehind="Member_Report.aspx.cs" Inherits="BackOffice.Member_Report" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
        <tr>
            <td>
                <asp:Label ID="lblMember" runat="server" Text="Member"></asp:Label>
            </td>

            <td>
                <asp:TextBox ID="txtMember" runat="server" ></asp:TextBox>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblEmail" runat="server" Text="Email"></asp:Label>
            </td>

            <td>
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblRegisteredDate" runat="server" Text="Registered From"></asp:Label>
                
            </td>

            <td>
                <asp:TextBox ID="txtRegisteredDate" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtRegisteredDate"
                Format="yyyy-MM-dd" Enabled ="true">
                </asp:CalendarExtender>
            </td>
        </tr>   
        
        <tr>
            <td>
                <asp:Label ID="lblRegisteredTo" runat="server" Text="Registered To"></asp:Label>
                
            </td>

            <td>
                <asp:TextBox ID="txtRegisteredTo" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtRegisteredTo"
                Format="yyyy-MM-dd" Enabled ="true">
                </asp:CalendarExtender>
            </td>
        </tr>      

        <tr>
            <td>
                <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label>
            </td>

            <td>
                <asp:RadioButtonList ID="rbStatus" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="0" Selected="True">Activated</asp:ListItem>
                    <asp:ListItem Value="1">Deactivated</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Search" 
                    onclick="btnSearch_Click" />
            </td>
            <td>
                <asp:Button ID="btnExport" runat="server" Text="Export" 
                    onclick="btnExport_Click" />
            </td>
        </tr>
    </table>
    
    <asp:GridView ID="MemberReport_Grid" runat="server" AutoGenerateColumns="False" >
        <Columns>
            <asp:TemplateField HeaderText = "No.">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Member">
                <ItemTemplate>
                    <asp:Label ID="lblMemberName" runat="server"><%#Eval("Name") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Email">
                <ItemTemplate>
                    <asp:Label ID="lblEmailAddress" runat="server"><%#Eval("EmailAddress") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Phone">
                <ItemTemplate>
                    <asp:Label ID="lblPhone" runat="server"><%#Eval("Phone") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Registered Date">
                <ItemTemplate>
                    <asp:Label ID="lblDateCreated" runat="server"><%#Eval("DateCreated") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Status">
                <ItemTemplate>
                    <asp:Label ID="lblStat" runat="server"><%#Eval("Status") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Reward Point">
                <ItemTemplate>
                    <asp:Label ID="lblRewardPoint" runat="server"><%#Eval("RewardPoint") %></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Amount Spent">
                <ItemTemplate>
                    <asp:Label ID="lblAmountSpent" runat="server"><%#Eval("TotalPrice") %></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

    <asp:Label ID="lblText" runat="server" Text="Total Member: "></asp:Label>&nbsp;&nbsp;
    <asp:Label ID="lblMemberCount" runat="server"></asp:Label>

    


    
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
</asp:Content>
